import {Component, OnInit} from '@angular/core';
import {DynModule} from '../../models/dyn-module';
import {ToDoComponent} from '../to-do/to-do.component';
import {LoginComponent} from '../login/login/login.component';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.less']
})
export class HomeComponent implements OnInit {

  userModules: Array<DynModule<any>> = [];

  constructor() {
  }

  ngOnInit() {
    // todo: 查询用户首页模块
    this.userModules = [
      new DynModule({dynComponent: LoginComponent, width: '40%', height: '300px'}),
      new DynModule({dynComponent: ToDoComponent, width: '60%', height: '150px'}),
      new DynModule({dynComponent: ToDoComponent, width: '60%', height: '150px'})
    ];
  }
}
